package com.songcan.gateway.converter;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.server.authentication.ServerAuthenticationConverter;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

@Component
public class YfAuthenticationConverter extends  BearerAuthenticationConverter implements ServerAuthenticationConverter {

    public YfAuthenticationConverter(RedisTemplate redisTemplate) {
        super(redisTemplate);
    }

    @Override
    public Mono<Authentication> convert(ServerWebExchange serverWebExchange) {
        return super.apply(serverWebExchange);
    }
}
